home *** CD-ROM | disk | FTP | other *** search
- Path: news.nstn.ca!news
- From: keichele@ac.dal.ca (Klaus Eichele)
- Newsgroups: comp.lang.c
- Subject: Re: Help! C code under Win 3.11
- Date: Sat, 24 Feb 1996 01:34:09 GMT
- Organization: Dalhousie University
- Message-ID: <4glbu9$jlo@news.nstn.ca>
- References: <4gko20$oha@earth.alpha.net>
- NNTP-Posting-Host: rewasylishen.chem.dal.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- sdg@earth.execpc.com (Software Development Group) wrote:
-
- >Could someone please tell me why this C code is not working under
- >Windows 3.11. It compiles, but does nothing.
-
- >The following code is main.c and there's another .c that has
- >a function that's called from here.
-
- >Most importantly, I'd like some kind of print-handler working.
- >At least that way I can see what's going on.
-
- < SNIP about 50 lines of code>
-
- >/* int*/
- >/* main(int argc, char **argv)*/
- >/* {*/
-
- >WINAPI
- >WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
- >{
- > #define MAXCMDTOKENS 128
- > int argc = 0;
- > LPSTR argv[MAXCMDTOKENS];
-
- < SNIP several 100 lines of code>
-
- Hi,
- The major problem here lies in the misconception that renaming main()
- into WinMain() creates a Windows 3.11 application. It is not quite as
- easy as that!!! The best reference is Charles Petzold's "Programming
- Windows 3.1" by Microsoft Press. There will be quite a bit of work
- involved to restructure your program into a well behaved Windows
- application.
- Otherwise, you might be better of by running your program in a DOS
- box.
-
- Good Luck,
- Klaus
-
- P.S. comp.lang.c is the completely wrong group for questions like
- this, and I am sure other people will point this out also. Try
- comp.os.ms-windows.programmers.misc and related groups.
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Klaus Eichele keichele@ac.dal.ca
- http://ac.dal.ca/~keichele/keichele.html
-
-